home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / utils2 / pwrbat22.zip / READKEY.PWR < prev    next >
Text File  |  1994-05-18  |  2KB  |  92 lines

  1. ;                      Demo Of The Capabilities Of ReadKey
  2.  
  3. Variable        InChar,1
  4. Variable        SpecInd,1
  5. Variable        ScrollLock,1,#16
  6. Variable        NumLock,1,#32
  7. Variable        CapsLock,1,#64
  8. Variable        Insert,1,#128
  9.  
  10. Variable        F1,1,#59
  11. Variable        F2,1,#60
  12. Variable        F3,1,#61
  13. Variable        F4,1,#62
  14. Variable        F5,1,#63
  15. Variable        F6,1,#64
  16. Variable        F7,1,#65
  17. Variable        F8,1,#66
  18. Variable        F9,1,#67
  19. Variable        F10,1,#68
  20. Variable        F11,1,#133
  21. Variable        F12,1,#134
  22. Variable        Esc,1,#27
  23.  
  24.  
  25.     ; which of the "lock" keys is on
  26. Clear
  27. ReadKey         InChar,SpecInd,1,1,ScrollLock
  28. WriteAt         1,1,'Scroll Lock.....Off'
  29. Compare         SpecInd,2,,NoLock
  30. WriteAt         1,1,'Scroll Lock.....On '
  31. Label        NoLock
  32. ReadKey         InChar,SpecInd,1,1,NumLock
  33. WriteAt         1,2,'NumLock.........Off'
  34. Compare         SpecInd,2,,NoNum
  35. WriteAt         1,2,'Num Lock........On '
  36. Label        NoNum
  37. Readkey         InChar,SpecInd,1,1,CapsLock
  38. WriteAt         1,3,'Caps Lock.......Off'
  39. Compare         SpecInd,2,,NoCaps
  40. WriteAt         1,3,'Caps Lock.......On '
  41. Label        NoCaps
  42. ReadKey         InChar,SpecInd,1,1,Insert
  43. WriteAt         1,4,'Insert..........Off'
  44. Compare         SpecInd,2,,NoIns
  45. WriteAt         1,4,'Insert..........On '
  46. Label        NoIns
  47. WriteAt         1,6,'Press any Function key...Escape ends Function key test'
  48. ReadKey         InChar,SpecInd,,1
  49. Compare         InChar,Esc,,,FTestEnd
  50. WriteAt         1,7,'You pressed    '
  51. Compare         SpecInd,1,FcnXit,FcnXit
  52. Compare         InChar,F1,ChkF2,FcnXit
  53. WriteAt         13,7,'F1 '
  54. Label       ChkF2
  55. Compare         InChar,F2,ChkF3,FcnXit
  56. WriteAt         13,7,'F2 '
  57. Label       ChkF3
  58. Compare         InChar,F3,ChkF4,FcnXit
  59. WriteAt         13,7,'F3 '
  60. Label       ChkF4
  61. Compare         InChar,F4,ChkF5,FcnXit
  62. WriteAt         13,7,'F4 '
  63. Label       ChkF5
  64. Compare         InChar,F5,ChkF6,FcnXit
  65. WriteAt         13,7,'F5 '
  66. Label       ChkF6
  67. Compare         InChar,F6,ChkF7,FcnXit
  68. WriteAt         13,7,'F6 '
  69. Label       ChkF7
  70. Compare         InChar,F7,ChkF8,FcnXit
  71. WriteAt         13,7,'F7 '
  72. Label       ChkF8
  73. Compare         InChar,F8,ChkF9,FcnXit
  74. WriteAt         13,7,'F8 '
  75. Label       ChkF9
  76. Compare         InChar,F9,ChkF10,FcnXit
  77. WriteAt         13,7,'F9 '
  78. Label       ChkF10
  79. Compare         InChar,F10,ChkF11,FcnXit
  80. WriteAt         13,7,'F10'
  81. Label       ChkF11
  82. Compare         InChar,F11,ChkF12,FcnXit
  83. WriteAt         13,7,'F11'
  84. Label       ChkF12
  85. Compare         InChar,F12,FcnXit,FcnXit
  86. WriteAt         13,7,'F12'
  87. Label       FcnXit
  88.  
  89. GoTo            NoIns
  90. Label        FTestEnd
  91. Halt
  92.